import request from '@/utils/request'

// 施肥api
const baseUrl = '/plant/fuse'

export function getFertilizerUsePage (pageParam,params) {
  return request({
    url: `${baseUrl}/${pageParam.pageNum}/${pageParam.pageSize}`,
    method: 'post',
    data: params
  })
}

export function saveFertilizerUse (data) {
  return request({
    url: `${baseUrl}`,
    method: 'post',
    data: data
  })
}

export function deleteFertilizerUseById (id) {
  return request({
    url: `${baseUrl}/${id}`,
    method: 'delete',
  })
}

export function updateFertilizerUse (data) {
  return request({
    url: `${baseUrl}/${data.companyId}`,
    method: 'put',
    data: data
  })
}

export function getAllFertilizerUse () {
  return request({
    url: `${baseUrl}/getAll`,
    method: 'get',
  })
}
